﻿<Window x:Class="IQToolkitCodeGen.View.ShellView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:appCore="clr-namespace:IQToolkitCodeGen.Core"
        xmlns:appView="clr-namespace:IQToolkitCodeGen.View"
        xmlns:extToolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"
        Title="{Binding DisplayText}"
        AllowDrop="True"
        Height="{Binding Height, Mode=TwoWay}"
        Width="{Binding Width, Mode=TwoWay}"
        Left="{Binding Left, Mode=TwoWay}"
        Top="{Binding Top, Mode=TwoWay}"
        WindowState="{Binding WindowState, Mode=TwoWay}"
        Icon="/IQToolkitCodeGen;component/Resources/IQToolKitCodeGen16.ico">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Closing">
            <appCore:InvokeCommandAction Command="{Binding WindowClosing}" />
        </i:EventTrigger>
        <i:EventTrigger EventName="Drop">
            <appCore:InvokeCommandAction Command="{Binding WindowDrop}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>

    <Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="315" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border Grid.ColumnSpan="3"
                    Grid.RowSpan="2"
                    Style="{StaticResource WindowBackground}" />

            <appView:MenuView Grid.ColumnSpan="2"
                              DataContext="{Binding Menu}" />

            <appView:SettingsView Grid.Row="1"
                                  Margin="10,10,5,10"
                                  DataContext="{Binding Settings}" />

            <appView:MappingView Grid.Column="2"
                                 Grid.Row="1"
                                 Margin="5,10,10,10"
                                 DataContext="{Binding Mapping}" />

            <StatusBar Grid.Row="2"
                       Grid.ColumnSpan="2">

                <StatusBarItem>
                    <TextBlock Text="Ready" />
                </StatusBarItem>
            </StatusBar>

        </Grid>
        <extToolkit:BusyIndicator IsBusy="{Binding IsBusy}" />
        <extToolkit:ChildWindow IsModal="True"
                                CloseButtonVisibility="Hidden"
                                Caption="Custom Schema Sql"
                                WindowStartupLocation="Center"
                                WindowState="{Binding CustomSchemaSqlViewWindowState, Mode=TwoWay}">
            <appView:CustomSchemaSqlView />
        </extToolkit:ChildWindow>
    </Grid>
</Window>
